package org.spdata.tsdb.dao;

import java.util.Date;
import java.util.List;

import org.bson.types.ObjectId;
import org.spdata.tsdb.entity.Snapshot;

public interface SnapshotDAO extends BaseDAO<Snapshot> {
	/**
	 * 每次新建全量快照就删除所有之前的快照
	 */
	public void deleteTimeoutSnapshots(Date before) ;
	
	/**
	 * 找到最近的全量快照
	 * @return
	 */
	public List<Snapshot> findLastFullSnapshot();
	
	/**
	 * 查找所有最近的增量快照
	 * @param after
	 * @return
	 */
	public List<Snapshot> findAdditionSnapshots(Date after,int size);
	
	public List<Snapshot> nextPageSnapshots(ObjectId after,int size);
 	
	public boolean existFullSnapshot();
}
